package com.hxzy.shop.config;

import feign.Feign;
import feign.querymap.BeanQueryMapEncoder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 功能描述
 *
 * @author tonneyyy
 */
@Configuration
public class FeignClientCustomizerConfig {

    /**
     * 替换解析 queryMap 的类，实现父类中变量的映射
     * @return
     */
    @Bean
    public Feign.Builder feignBuilder() {
        return Feign.builder()
                .queryMapEncoder(new BeanQueryMapEncoder());
    }
}
